@extends('cms/system/admin/template/theme_default/common')
@section('page-body')
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-header layui-form layuiadmin-card-header-auto">
                <!--region 搜索部分-->
                <!--endregion-->
            </div>
            <div class="layui-card-body">
                <table id="tencent-config-list" lay-filter="tencent-config-list"></table>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        layui.config({
            base: '/layui-admin/'
        }).extend({
            index: 'lib/index'
        }).use(['index'], function () {
            // 渲染列表
            layui.table.render({
                elem: '#tencent-config-list',
                url: layui.setter.apiLink + '/tencent/admin_config/retrieve?app_id={{$app['id'] ?? 0}}',
                parseData: function (result) {
                    return {
                        code: result.code == 1 ? 0 : 1,
                        msg: result.msg,
                        count: result.data.total,
                        data: result.data.items
                    }
                },
                cols: [[
                    {type: '{{$select_multi ? 'checkbox' : 'radio'}}', fixed: 'left'},
                    {field: 'id', width: 80, title: 'ID', sort: true},
                    {field: 'name', title: '名称'}
                ]],
                page: true,
                limit: 10,
                limits: [10, 15, 20, 25, 30],
                text: '数据加载异常！',
                done: function () {
                    window[window.TARGET_NAME].layui.layer.iframeAuto(window.LAYER_INDEX);
                }
            });
        });
        function selectConfirm() {
            return layui.table.checkStatus('tencent-config-list');
        }
    </script>
@endsection